<template>
  <el-collapse v-model="activeNames" acc class="newCOpse">
    <el-collapse-item :name="title">
      <template slot="title">
        <i class="item_icon" />{{ title }}
      </template>
      <div class="content-box">
        <slot />
      </div>
    </el-collapse-item>
  </el-collapse>
</template>
<script>
export default {
  name: 'TCollapse',
  props: {
    title: {
      type: String,
      default: '标题'
    }
  },
  data() {
    return {
      activeNames: [this.title]
    }
  }
}
</script>
<style scoped>
.el-collapse {
  margin-bottom: 15px;
  border: 1px solid #EBEEF5;
}
.item_icon {
  width: 6px;
  background: rgb(235, 75, 75);
  height: 15px;
  margin-right: 10px;
  border-radius: 10px
}
.content-box {
  width: 100%;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 400;
  line-height: 0;
}
::v-deep .el-collapse-item {
    box-shadow: none;
    /* 调整各个item之间的距离为20px */
    /* border: 1px; */
}
/* ::v-deep .el-collapse-item__wrap {
    padding: 0 0px;
} */

</style>
